home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CICA 1993 April
/
CICA MS Windows - April 1993.iso
/
unzipped
/
programr
/
listings
/
blxv1
/
winfont.h
< prev
Wrap
Text File
|
1991-01-22
|
780b
|
20 lines
#include<windows.h>
#include<string.h>
class WinFont {
LOGFONT lf;
HFONT hFont;
public:
WinFont(void) {
memset(&lf,0,sizeof(LOGFONT));
hFont = NULL;
}
void Create(void) { hFont = CreateFontIndirect(&lf); }
HFONT GetHandle(void) { return hFont; }
void SetFontWeight(int weight) { lf.lfWeight = weight; }
void SetFontCharSet(BYTE charset) { lf.lfCharSet = charset; }
void SetFontPitchAndFamily(BYTE pnf) { lf.lfPitchAndFamily = pnf; }
void SetFontHeight(int height) { lf.lfHeight = height; }
void SetFontWidth(int width) { lf.lfWidth = width; }
void SetFontName(char *name) { strcpy((char *)lf.lfFaceName, name); }
};